﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Vmago.Models
{
    public class RepositorySysCategory:ISysCategory
    {
        #region ISysCategory Members

        private SysCategoryDataContext dataContext;

        public RepositorySysCategory()
        {
          dataContext = new SysCategoryDataContext();
        }

        public IEnumerable<sysCategoryValue> GetSysCategory(string CategoryClassName)
        {

            IEnumerable<sysCategoryValue> SysCategory = from p in dataContext.sysCategoryValues
                                                        where p.CategoryName.Equals( CategoryClassName)
                                                        select p;

            return SysCategory;
        }

        #endregion
    }
}
